1. Field of the Invention
The present invention relates to a microcomputer in which M number of memories are operated as a single memory for processing.
2. Description of the Related Art
Microcomputers commonly incorporate a mask ROM for storing an operation controlling program and a RAM for storing data. A nonvolatile memory (a flash memory) which can collectively and electrically erase stored data is also known and can now be found in some microcomputers in the place of a mask ROM and RAM. A microcomputer having a nonvolatile memory has an advantage in that the stored operation control program can be rewritten as the nonvolatile memory can electrically erase the stored data. Therefore, more microcomputers with nonvolatile memories are becoming more common.
To develop microcomputers having nonvolatile memories, programs must be accurately formulated so that the microcomputers can operate properly. Specifically, in a development period, a formulated program is written into a microcomputer, and the microcomputer is then activated based on the written program to see whether or not the microcomputer operates properly. If an error occurs to the program, the error must be corrected or a modified program must be written into the microcomputer for evaluation. Repetition of writing and evaluation of programs enables to formulate a correct program.
Referring to FIG. 1, a program is written into a microcomputer by using a system shown in the drawing. That is, program data to be written in a nonvolatile memory of a microcomputer 103 is formulated on a personal computer 101. The formulated data is transferred in a predetermined format, such as a predetermined format corresponding to an 8-bit width of the memory of a 16-bit microcomputer, so that a PROM (program ROM) writer 102 writes an operation controlling program into a flash memory incorporated into the microcomputer 103, based on the program data.
Conventionally, a personal computer 101 transfers program data in the form of an 8-bit width format to a PROM writer 102. Here, some 16-bit microcomputers may actually use two 8-bit width memories as if they were a single 16-bit width memory. The PROM writer 102 cannot write program data into such a 16-bit width memory when it is only simply connected to the microcomputer because the PROM writer 102 is originally made for an 8-bit width memory. That is, the PROM writer 102 can not readily be used for a memory with a 16-bit memory width.
The present invention has been conceived to overcome the above problems and aims to provide a microcomputer which can use two or more memories as if they were single memory. The present invention also aims to achieve writing of data into such a memory by using a PROM writer adapted to a memory of a bit number different from the bit number of the memory.
According to the present invention, there is provided a microcomputer, comprising M number of memories each having an N-bit width and identical addresses; a selection circuit for selectively placing one memory of the M number of memories to be in an enabled state based on an externally supplied control signal to thereby select the memory; and an addressing circuit for addressing the M number of memories based on an externally supplied address signal;
wherein data is written into the memory which was placed in an enabled state.
Further, in the above microcomputer, the externally supplied control signal may be a most significant bit of the externally supplied address signal.
Still further, the selection circuit may selectively choose a memory according to an externally supplied designation signal showing a writing mode, and place the M number of memories in an enabled state according to a designation signal showing a normal operation mode to make the M number of memories to operate as a memory of an Nxc3x97M bits.
Still further, the memory may be a nonvolatile memory capable of electrically and collectively erasing stored data.
Also, when the M number of memories are all set in an enabled state, data of a Nxc3x97M-bit width can be read from the memories.
Therefore, according to the present invention, when a program is written into a microcomputer for Nxc3x97M (e.g., 16) bits by using, for example, a PROM writer, data of N-bits (e.g., 8 bits) is written into each of the M (e.g., two) number of memories each having an N-bit width. This arrangement enables writing a program into a microcomputer for Nxc3x97M bits by using a PROM writer for N-bits. Therefore, a general purpose PROM writer for N bits can be used to write data with into a memory of a microcomputer for larger bit numbers. Also, data of Nxc3x97M bits can be read from M number of memories by collectively designating the addresses in the memories, i.e., identical addresses, where corresponding data is stored.